package users;

import operations.*;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description:用户
 * User:22954
 * Date:2024-01-12
 * Time:20:32
 */
public class NormalUser extends User {
    public NormalUser(String name) {
        super(name);
        this.iOperations = new IOperation[]{
                new ExitOperation(),
                new FindOperation(),
                new BorrowOperation(),
                new ReturnOperation(),
                new DisplayOperation()
        };
    }

    public int menu() {
        Scanner scanner = new Scanner(System.in);
//        System.out.println("*********************");
//        System.out.println("欢迎"+getName()+"登入图书馆系统");
//        System.out.println("1.查找图书");
//        System.out.println("2.借阅图书");
//        System.out.println("3.归还图书");
//        System.out.println("4.显示书架");
//        System.out.println("0.退出系统");
//        System.out.println("*********************");
//        System.out.print("请选择操作:");
        System.out.println("*********************");
        System.out.println("Welcome Mr/Mrs." + getName() + " log in to the library system");
        System.out.println("1.Find Book");
        System.out.println("2.Borrow Book");
        System.out.println("3.Return Book");
        System.out.println("4.Display Bookshelves");
        System.out.println("0.Log Out Of The System");
        System.out.println("*********************");
        System.out.print("Please select an Operation:");
        return scanner.nextInt();
    }
}
